<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "{{%pic_temp}}".
 *
 * @property string $id
 * @property string $title
 * @property string $desc
 * @property string $tags
 * @property string $content
 * @property string $local_content
 * @property integer $img_num
 * @property integer $view
 * @property integer $create_time
 * @property string $url
 * @property integer $status
 * @property string $old_id
 * @property string $new_id
 */
class PicTemp extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%pic_temp}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['desc', 'content', 'local_content','name'], 'string'],
            [['img_num', 'view', 'create_time', 'status', 'old_id', 'new_id','in_redis'], 'integer'],
            [['title', 'url'], 'string', 'max' => 150],
            [['tags'], 'string', 'max' => 200],
            [['name'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'desc' => 'Desc',
            'tags' => 'Tags',
            'content' => 'Content',
            'local_content' => 'Local Content',
            'img_num' => 'Img Num',
            'view' => 'View',
            'create_time' => 'Create Time',
            'url' => 'Url',
            'status' => 'Status',
            'old_id' => 'Old ID',
            'new_id' => 'New ID',
            'name'=>'名字'
        ];
    }
}
